﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


namespace TeamTime
{
    public partial class LabelWithTimedMsg : System.Web.UI.UserControl
    {
        private string Text
        {
            get { return this.lbl.Text; }
            set { this.lbl.Text = value; }
        }
        //public bool Visible
        //{
        //    get { return this.lbl.Visible; }
        //    set { this.lbl.Visible = value; }
        //}


        private int showMessageForXSeconds = 3;
        //private int ShowMessageForXSeconds
        //{
        //    get
        //    {
        //        return showMessageForXSeconds;
        //    }
        //    set { showMessageForXSeconds = value; }
        //}

        
        protected void Page_Load(object sender, EventArgs e)
        {

        }

 
        public void ShowStatusMessage(string msg)
        {
            ShowStatusMessage(msg, showMessageForXSeconds);
        }
        public void ShowStatusMessage(string msg, int forXSeconds)
        {   
            showMessageForXSeconds = forXSeconds;
            this.txtCountSeconds.Text = forXSeconds.ToString();
            this.lbl.Text = msg;
        }
    }
}